﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>店铺订单列表页  - ${web.name}${web.additionalTitle!}</title>
<link href="${root}/u/css/main.css" type="text/css" rel="stylesheet" />
<link href="${root}/u/css/memeber.css" type="text/css" rel="stylesheet" />
<link href="${root}/u/css/buy.css" type="text/css" rel="stylesheet" />
<script src="${sysResRoot}/jquery.js" type="text/javascript"></script>
<script src="${base}/thirdparty/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
	$("#jvForm").validate();
});

function del(id){
	var ids=new Array(1);
	ids[0]=id;
	$.post(
		"delete.jspx",
		{orderId:ids},
		function(data){
			location.reload();
		});
}

function optDelete(){
	if(Pn.checkedCount('orderId')<=0){
		alert("请选择要删除的数据");
		return;
	}
	if(!confirm("确认删除")){
		return;
	}
	var f=document.getElementById('tableForm');
	f.action="delete.jspx";
	f.submit();
}
</script>
</head>
<body>
[#include "../include/shop_top.html"/]
<div class="w1168">
	[#include "店铺中心_导航.html"/]
	<div class="user_right">    
        <div class="user_title2">商家订单管理</div>  
		<div class="clear10"></div> 
			<form id="jvForm" action="list.jspx" method="post">
			<table class="favorite_tb" cellspacing="0" cellpadding="0" width="100%" border="0">
				<tr>
					<td width="100" height="30" align="right">商品名称：</td>
					<td><input id="productName" type="text" maxlength="30" value="${productName!}" name="productName" size="50" class="address_input"/></td>
				</tr>
				<tr>
					<td width="100" height="30" align="right">商品编号：</td>
					<td><input id="code" type="text" maxlength="30" value="${code!}" name="code" size="50" class="address_input"/></td>
				</tr>
				<tr>
					<td width="100" height="30" align="right">下单时间：</td>
					<td>
						<input type="text" name="startTime" value="${startTime!}" class="Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" style="height:22px; width:100px;"/>&nbsp;到
						<input type="text" name="endTime"  value="${endTime!}" class="Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" style="height:22px; width:100px;"/>
					</td>
				</tr>
				<tr>
					<td width="100" height="30" align="right">收货人：</td>
					<td> <input id="userName" type="text" name="userName" value="${userName!}" class="dzinput"/></td>
				</tr>
				<tr>
					<td width="100" height="30" align="right">订单状态：</td>
					<td> 
					<select id="status" name="status" class="dzinput">
							<option value="">--订单状态--</option>
							<option value="1" [#if status??&&status=1]selected="selected"[/#if]>未确认</option>
							<option value="2" [#if status??&&status=2]selected="selected"[/#if]>已确认</option>
							<option value="3" [#if status??&&status=3]selected="selected"[/#if]>已取消</option>
							<option value="4" [#if status??&&status=4]selected="selected"[/#if]>已完成</option>
						</select></td>
				</tr>
				<tr>
					<td width="100" height="30" align="right">支付状态：</td>
					<td>
					<select id="paymentStatus" name="paymentStatus" class="dzinput">
							<option value="">--支付状态--</option>
							<option value="1" [#if paymentStatus??&&paymentStatus=1]selected="selected"[/#if]>未支付</option>
							<option value="2" [#if paymentStatus??&&paymentStatus=2]selected="selected"[/#if]>已支付</option>
							<option value="3" [#if paymentStatus??&&paymentStatus=3]selected="selected"[/#if]>已退款</option>
						</select></td>
				</tr>
				<tr>
					<td width="100" height="30" align="right">配送状态：</td>
					<td>
					<select id="shippingStatus" name="shippingStatus" class="dzinput">
							<option value="">--配送状态--</option>
							<option value="1" [#if shippingStatus??&&shippingStatus=1]selected="selected"[/#if]>未发货</option>
							<option value="2" [#if shippingStatus??&&shippingStatus=2]selected="selected"[/#if]>已发货</option>
							<option value="3" [#if shippingStatus??&&shippingStatus=3]selected="selected"[/#if]>已退货</option>
						</select></td>
				</tr>                          
				<tr>
					<td width="100" height="30" align="right">支付方式：</td>
					<td>
						<select id="paymentId" name="paymentId" class="dzinput">
							<option value="">--支付方式--</option>
							[#list paymentList as payment]
							<option value="${payment.id}"
							[#if paymentId??] 
							[#if paymentId==payment.id]
							selected="selected"
							[/#if]
							[/#if]>${payment.name!}</option>
							[/#list]
						</select>
					</td>
				</tr>
				<tr>
					<td width="100" height="30" align="right">订单金额：</td>
					<td>
						<input type="text" name="startOrderTotal" value="${startOrderTotal!}" class="dzinput" style="width:80px;"/> 至
						<input type="text" name="endOrderTotal" value="${endOrderTotal!}" class="dzinput" style="width:80px;"/>
					</td>
				</tr>
				<tr>
					<td width="100" height="30" align="right">配送方式：</td>
					<td>
						<select id="shippingId" name="shippingId" class="dzinput">
							<option value="">--配送方式--</option>
							[#list shippingList as shipping]
							<option value="${shipping.id}"
							[#if shippingId??] 
							[#if shippingId==shipping.id]
							selected="selected"
							[/#if]
							[/#if]>
							${shipping.name!}</option>
							[/#list]
						</select>
					</td>
				</tr>
				<tr>
					<td align="center" height="30">&nbsp;</td>
					<td height="30"><button class="menu_ok" type="submit">搜索</button></td>
				</tr>
			</table>
			</form>
        <div class="clear10"></div>
        <form method="post" id="tableForm">
        <table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#cccccc" style="font-size:12px;">
			<tr>
				<td width="10" align="center" bgcolor="#f0f0f0"><input type="checkbox" onclick='Pn.checkbox("ids",this.checked)'/></td>
				<td height="30" width="5%" align="center" bgcolor="#f0f0f0">序号</td>
				<td align="center" width="12%" bgcolor="#f0f0f0">订单编号</td>
				<td align="center" width="8%" bgcolor="#f0f0f0">收货人</td>
				<td align="center" width="10%" bgcolor="#f0f0f0">支付方式</td>
				<td align="center" width="8%" bgcolor="#f0f0f0">订单金额</td>
				<td align="center" width="12%" bgcolor="#f0f0f0">订单时间</td>
				<td align="center" width="8%" bgcolor="#f0f0f0">状态</td>
				<td align="center" width="10%" bgcolor="#f0f0f0">支付状态</td>          
				<td align="center" width="8%" bgcolor="#f0f0f0">配送状态</td>
				<td align="center" width="40" bgcolor="#f0f0f0">操作</td>
			</tr>
        </table>
        
        [@order_page status=status count='10' code=code storeId=store.id productName=productName userName=userName paymentId=paymentId shippingId=shippingId startTime=startTime endTime=endTime startOrderTotal=startOrderTotal endOrderTotal=endOrderTotal isRefunded=isRefunded paymentStatus=paymentStatus shippingStatus=shippingStatus isRefunded=0]
        [#if tag_list?size gt 0]
        <table  cellspacing="0" cellpadding="0" width="100%" border="0">
			[#list tag_list as order]
			<tr>
				<td width="10" align="center"><input type="checkbox" name="orderId" value="${order.id!}"/></td>
				<td width="5%" height="40" align="center">${order.id!}</td>
				<td width="12%" align="center">${order.code!}</td>
				<td width="8%" align="center">${order.receiveName!}</td>
				<td width="10%" align="center">
				[#if order.payment??]${order.payment.name!}[/#if]
				</td>
				<td width="8%" align="center">${order.total!}</td>
				<td width="12%" align="center">${order.createTime?string('yyyy-MM-dd HH:mm:ss')}</td>
				<td width="8%" align="center">[@s.m "order.status.${order.status}"/]</td>
				<td width="10%" align="center">[@s.m "order.paymentStatus.${order.paymentStatus}"/]</td>            
				<td width="8%" align="center">[@s.m "order.shippingStatus.${order.shippingStatus}"/]</td>
				<td width="40" align="center"><a href="view.jspx?orderId=${order.id}&op=1&pageNo=${pageNo!}&param=false" target="_blank" style="color:#F00;">查看</a>
				<input type="submit" value="修改" onclick="this.form.action='editButton.jspx?orderId=${order.id}&pageNo=${pageNo!}'"[#if order.shippingStatus==2||order.paymentStatus==2]disabled[/#if]/ style="color:#390; cursor:pointer; background:#FFF;">
				[#if "${order.shippingStatus}"=="2"]
				<a href="javascript:if(confirm('这是已发货的订单,确认删除?')) del(${order.id})" style="color:#03F">删除</a>
				[#else]
				<a href="javascript:if(confirm('确认删除?')) del(${order.id})" style="color:#03F">删除</a>
				[/#if]
				</td>           
			</tr>
			<tr>
				<td height="1" colspan="11" bgcolor="#e7e7e7"></td>
			</tr>
			[/#list]
        [#else]
        <div class="zwsj">暂无数据</div>
        [/#if]
        </table>
        <div class="pageNumber">[@pagination_style sysPage='3'/]</div>
        <input type="button" class="menu_ok2" value="批量删除" onclick="optDelete();"/>
        [/@order_page]
        </form>
	</div>
	<div class="clear10"></div>
	<div class="clear10"></div>
</div>   
[#include "../include/footer_information_bar.html"/]
</body>
</html>